package router

import (
	"github.com/gin-gonic/gin"
	"self-test/handlers"
)

func Router() *gin.Engine {
	// 1.创建路由
	r := gin.Default()
	r.POST("/login", handlers.Login)
	r.POST("/add", handlers.Add)
	r.GET("/roleNode", handlers.RoleNode)
	r.GET("/userRole", handlers.UserRole)
	r.GET("/carOrder", handlers.CarOrder)
	r.GET("/list", handlers.List)
	r.GET("/detail", handlers.Detail)
	return r
}
